<template>
    <div class="h-100p bg-fff bdr-10 detail">
        <div class="detail-container">
            <v-bill-detail-page :bill="currentBillDetail"/>
        </div>
    </div>
</template>

<script lang="ts">
  import { Vue, Component } from 'vue-property-decorator'
  import vBillDetailPage from '@/components/bill-detail-page'

  @Component({
    components: {
      vBillDetailPage
    }
  })
  export default class Transaction extends Vue {
    id = ''
    currentBillDetail = {}

    async getBillDetail () {
      let res: AjaxResponse = await  this.$axios.get(`b/boms/bill/${this.id}`)
      if (res.responseCode === 200) {
        this.currentBillDetail = res.data
      }
    }

    mounted () {
      this.id = this.$route.params.id
      this.getBillDetail()
    }
  }
</script>

<style lang="less" scoped>
    .detail {
        overflow-y: scroll;
        padding-top: 40px;
    }

    .detail-container {
        width: 1180px;
        margin: 0 auto;
    }
</style>
